Skip to content

feat: migrate HN API from REST to Firebase SDK (WebSocket) - #123

Merged
therealsama merged 1 commit into
mainfrom
firebase-sdk-migration
May 27, 2026
Merged

therealsama merged 1 commit into
mainfrom
firebase-sdk-migration

Conversation

@therealsama

Copy link
Copy Markdown
Collaborator
  • Add src/api/hnSdk.ts adapter with readRankedIds, readItem, readUser
  • Rewrite hn.ts internals to use SDK (topstories, beststories, show, ask)
  • Move useUserProfile and TopSourceComparison to SDK (then delete unused page)
  • Code-split route components with React.lazy for smaller chunks
  • Replace MSW Firebase handlers with vi.spyOn(hnSdk) in all unit tests
  • Suppress jsdom/Node warnings in test setup (scrollTo, navigation, DEP0205)
  • Remove FIREBASE_API from handlers.ts (keep Algolia MSW only)
  • Fix act() warnings in 4 test files by awaiting async state settlement

@therealsama
therealsama requested a review from kplachkov as a code owner May 27, 2026 19:54
- Add src/api/hnSdk.ts adapter with readRankedIds, readItem, readUser
- Rewrite hn.ts internals to use SDK (topstories, beststories, show, ask)
- Move useUserProfile and TopSourceComparison to SDK (then delete unused page)
- Code-split route components with React.lazy for smaller chunks
- Replace MSW Firebase handlers with vi.spyOn(hnSdk) in all unit tests
- Suppress jsdom/Node warnings in test setup (scrollTo, navigation, DEP0205)
- Remove FIREBASE_API from handlers.ts (keep Algolia MSW only)
- Fix act() warnings in 4 test files by awaiting async state settlement
@therealsama
therealsama force-pushed the firebase-sdk-migration branch from 4119390 to 4c491bb Compare May 27, 2026 20:15
@therealsama
therealsama enabled auto-merge May 27, 2026 22:37
@therealsama
therealsama merged commit 74347c9 into main May 27, 2026
4 checks passed
@therealsama
therealsama deleted the firebase-sdk-migration branch May 27, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants